/*
    This file is part of FNote.

    FNote is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    FNote is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with FNote.  If not, see <http://www.gnu.org/licenses/>.

    Copyright (c) 2009, Maciej "Fazi" Gałkowski <fazi.dev@gmail.com>
*/

#ifndef FNOTE_MAINWINDOW_H_INCLUDED
#define FNOTE_MAINWINDOW_H_INCLUDED

#include <QSystemTrayIcon>
#include <QClipboard>
#include <QDialog>
#include <QSettings>

class MainWindow: public QDialog
{
    Q_OBJECT

    public:
        MainWindow(const QString &configDirStr);
        virtual ~MainWindow();

    protected:
        void closeEvent(QCloseEvent *event);

    private slots:
        void trayActivated(QSystemTrayIcon::ActivationReason reason);

    private:
        void createTrayIcon();
        void toggleWindow();
        void fastPaste();
        void loadSettings();
        void saveSettings();

        QSystemTrayIcon *trayIcon;
        QClipboard::Mode clipboardMode;
        QSettings *appSettings;
};

#endif // FNOTE_MAINWINDOW_H_INCLUDED
